﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;

namespace BussinessLayer
{
    public class tblDoanvien_ketquahoctap
    {
        DataLayer.Data odata = new DataLayer.Data();
        public DataTable SelectDV(int hocky, string namhoc)
        {
            return odata.view_text("select * from hocsinh_giaovien as hsgv, doanvien as dv, hocsinh_chidoan as dvcd, chidoan as cd where hsgv.id=dv.id and dv.id=dvcd.id and dvcd.chidoan_id=cd.chidoan_id");
        }
        public void ketquahoctap(int id, int hocky, string namhoc, int diem)
        {
            SqlParameter[] sp = new SqlParameter[4];
            sp[0] = new SqlParameter("@id", id);
            sp[1] = new SqlParameter("@hocky", hocky);
            sp[2] = new SqlParameter("@namhoc", namhoc);
            sp[3] = new SqlParameter("@ketquahoctap", diem);
            odata.proc_TS("tblDoanvien_ketquahoctap", sp);
        }
    }
}
